package uk.co.revisual.puremvc.loader.clients
{
	import flash.events.Event;
	
	import uk.co.revisual.puremvc.loader.interfaces.IClientInfo;
	
	public class ClientBase
	{
		private var mLoadInfo:IClientInfo;
		
		public function ClientBase(cli:IClientInfo)
		{
			mLoadInfo = cli;
		}
		
		public function load():void
		{
			throw new Error("this method must be overridden")
			
		}
		protected function removeListeners():void{

			throw new Error("this method must be overridden")

		}
		protected function addListeners():void{

			throw new Error("this method must be overridden")

		}
		

		
		protected function ioErrorHandler(event:Event):void{
			
			removeListeners();
			mLoadInfo.relayEvent(event);
			
		}
		
		protected function relayHandler(event:Event):void{
			
			mLoadInfo.relayEvent(event);
			
		}
		
		protected function get clientLoaderInfo():IClientInfo
		{ 
			return mLoadInfo
		}
		

		
		

	}
}